﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

using System.Windows.Markup;

using Prism.Games.GalEngine.Scripts.Data.BranchSystem;
using Prism.Games.GalEngine.Scripts.Data.ResourceCollection;
using Prism.Games.GalEngine.Scripts.FunctionModel;

namespace Prism.Games.GalEngine.Scripts
{
    /// <summary>
    /// 节类型，表示一系列场景的集合以及其逻辑。
    /// </summary>
    [Serializable]
    public class Section : ScriptObject, IReaderLogable
    {

        public Section()
        {
            this.Scenes = new SceneCollection();
        }

        /// <summary>
        /// 获取要播放的场景的集合。
        /// </summary>
        public SceneCollection Scenes
        {
            get;
            set;
        }

        private Branch branch;
        public Branch Branch
        {
            get
            {
                return this.branch;
            }
            set
            {
                if (this.branch != value)
                {
                    this.branch = value;
                    this.OnPropertyChanged("Branch");
                }
            }
        }

        private SectionInformation sectionInformation;

        public SectionInformation SectionInformation
        {
            get { return sectionInformation; }
            set
            {
                sectionInformation = value;
                this.OnPropertyChanged("SectionInformation");
            }
        }

        public bool IsRead
        {
            get;
            set;
        }
    }
}
